using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace Ent.Web.Helper
{
    public enum BrowserType { IE, FF, None }
    public class BrowserHelper
    {
        public static BrowserType Browser
        {
            get
            {
                string bType = HttpContext.Current.Request.Browser.Type;
                if (bType.ToLower().Contains("firefox"))
                    return BrowserType.FF;
                else if (bType.ToLower().Contains("ie"))
                    return BrowserType.IE;
                else
                    return BrowserType.None;
            }
        }
        public static string GetBrowserBool(bool val)
        {
            return val ? (Browser == BrowserType.FF ? "1" : "true")
                    : (Browser == BrowserType.FF ? "0" : "false");
        }
    }
}
